package com.zxp.cloud.order.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.zxp.cloud.core.db.idgen.SnowflakeGenerator;
import com.zxp.cloud.core.db.jpa.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.UpdateTimestamp;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zxp
 * @date 2021/7/19 17:14
 */
@Entity
@Data
@Table(name="shop_order")
public class Order extends BaseEntity {

    private Long userId;
    private Long productId;

    private Integer count; // 购买数量
    private BigDecimal money; // 订单金额

    private Integer status; // 订单状态： 0:创建中 1:已完结',
}
